import multiprocessing
import time


def func1(name):
    print('这是func1:{}'.format(name))
    time.sleep(5)
    print('func1结束')


def func2(name):
    print('这是func2:{}'.format(name))
    time.sleep(5)
    print('func2结束')


if __name__ == '__main__':
    t1 = time.time()
    p1 = multiprocessing.Process(target=func1, args=('lily',))
    p2 = multiprocessing.Process(target=func2, args=('ella',))
    p1.start()
    p2.start()

    p1.join()
    p2.join()

    print('over')
    print(time.time() - t1)
